package com.whitehot.klib.engine.bean;

import android.text.TextUtils;

/**
 * Created by ytf on 2018/5/20 020.
 * Description:
 */

public class Ipinfo
{
    public String ip;
    public String country;
    public String area;
    /**省份*/
    public String region;
    /**市*/
    public String city;
    /**镇*/
    public String county;
    /**网络提供商*/
    public String isp;
    /**国家id*/
    public String country_id;
    /**地区id*/
    public String area_id;
    /**省份id*/
    public String region_id;
    /**城市id*/
    public String city_id;
    /**城镇id*/
    public String county_id;
    /**服务商id*/
    public String isp_id;

    public static Ipinfo buildEmptyInfo()
    {
        Ipinfo p = new Ipinfo();
        return p;
    }

    public String getIp()
    {
        return nullFilter(ip);
    }

    public String getCountry()
    {
        return nullFilter(country);
    }

    public String getArea()
    {
        return nullFilter(area);
    }

    public String getRegion()
    {
        return nullFilter(region);
    }

    public String getCity()
    {
        return nullFilter(city);
    }

    public String getCounty()
    {
        return nullFilter(county);
    }

    public String getIsp()
    {
        return nullFilter(isp);
    }

    public String getCountry_id()
    {
        return nullFilter(country_id);
    }

    public String getArea_id()
    {
        return nullFilter(area_id);
    }

    public String getRegion_id()
    {
        return nullFilter(region_id);
    }

    public String getCity_id()
    {
        return nullFilter(city_id);
    }

    public String getCounty_id()
    {
        return nullFilter(county_id);
    }

    public String getIsp_id()
    {
        return nullFilter(isp_id);
    }

    private static String nullFilter(String a)
    {
        if(TextUtils.isEmpty(a))
        {
            return "";
        }
        return a;
    }
}
